package com.hackintosh.chat;

/**
 * @description：
 * @author：twislyn
 * @date：Created in 2021/06/03
 * @modified By：
 * @version: 1.0
 */
public class Tom extends Customer {
    public Tom(String name) {
        super(name);
        clientWindow(350,100);
    }

    @Override
    public void send(String sentence) {
        receiveArea.append(String.format("我(卖方)说: %s \n",sentence));
        receiveArea.setCaretPosition(receiveArea.getText().length());
        medium.reply(name,sentence);
    }

    @Override
    public void receive(String from, String sentence) {
        receiveArea.append(String.format("%s说：%s\n",from,sentence));
        receiveArea.setCaretPosition(receiveArea.getText().length());
    }
}
